VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmAbrirReporteComisiones 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Abrir Reporte de Comisiones"
   ClientHeight    =   3480
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5115
   Icon            =   "frmAbrirReporteComisiones.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3480
   ScaleWidth      =   5115
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdSalir 
      BackColor       =   &H80000014&
      Cancel          =   -1  'True
      Caption         =   "&Salir"
      Height          =   375
      Left            =   3540
      MaskColor       =   &H00FFFFFF&
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   3000
      Width           =   1425
   End
   Begin VB.CommandButton cmdMostrar 
      BackColor       =   &H80000014&
      Caption         =   "&Mostrar"
      Height          =   375
      Left            =   2100
      MaskColor       =   &H00FFFFFF&
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   3000
      Width           =   1425
   End
   Begin VB.Frame fraContenedor 
      BackColor       =   &H00808080&
      BorderStyle     =   0  'None
      ClipControls    =   0   'False
      Height          =   2475
      Left            =   0
      TabIndex        =   0
      Top             =   390
      Width           =   9015
      Begin VB.ComboBox cboEmpleado 
         Height          =   315
         Left            =   1140
         Style           =   2  'Dropdown List
         TabIndex        =   12
         Top             =   1620
         Width           =   1665
      End
      Begin VB.Frame frParametros 
         BackColor       =   &H80000014&
         Height          =   615
         Left            =   -30
         TabIndex        =   2
         Top             =   0
         Width           =   15255
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Seleccione el rango de Fechas"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   300
            Left            =   120
            TabIndex        =   3
            Top             =   240
            Width           =   3720
         End
      End
      Begin VB.CheckBox chkOcultarCamposPrecio 
         BackColor       =   &H8000000C&
         Caption         =   "Ocultar Campos de Precio de Servicio"
         ForeColor       =   &H8000000E&
         Height          =   255
         Left            =   270
         TabIndex        =   1
         Top             =   2100
         Width           =   3735
      End
      Begin MSComCtl2.DTPicker dtFin 
         Height          =   315
         Left            =   1140
         TabIndex        =   4
         Top             =   1260
         Width           =   1665
         _ExtentX        =   2937
         _ExtentY        =   556
         _Version        =   393216
         Format          =   52166657
         CurrentDate     =   38745
      End
      Begin MSComCtl2.DTPicker dtInicio 
         Height          =   315
         Left            =   1140
         TabIndex        =   5
         Top             =   900
         Width           =   1665
         _ExtentX        =   2937
         _ExtentY        =   556
         _Version        =   393216
         Format          =   52166657
         CurrentDate     =   38745
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Empleado :"
         ForeColor       =   &H8000000E&
         Height          =   195
         Left            =   270
         TabIndex        =   11
         Top             =   1650
         Width           =   795
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Desde :"
         ForeColor       =   &H8000000E&
         Height          =   195
         Left            =   240
         TabIndex        =   7
         Top             =   960
         Width           =   555
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Hasta :"
         ForeColor       =   &H8000000E&
         Height          =   195
         Left            =   240
         TabIndex        =   6
         Top             =   1320
         Width           =   510
      End
   End
   Begin VB.Label lblTitulo 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Reporte de Comisiones"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   360
      Left            =   60
      TabIndex        =   10
      Top             =   0
      Width           =   2970
   End
End
Attribute VB_Name = "frmAbrirReporteComisiones"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mvarLista As New Collection
Private control As New cReporte
Private mvarlistaEmpleado As Collection

Private Sub Form_Unload(Cancel As Integer)
    Set mvarlistaEmpleado = Nothing
End Sub


Public Property Get listaEmpleado() As Collection
    Set listaEmpleado = mvarlistaEmpleado
End Property

Public Property Set listaEmpleado(listaEmpleado As Collection)
    Set mvarlistaEmpleado = listaEmpleado
    llenaEmpleados
End Property

Private Sub llenaEmpleados()
Dim bEmpleado As bEmpleado
Dim i As Integer
cboEmpleado.AddItem "<<TODOS>>"
For i = 1 To mvarlistaEmpleado.Count
    Set bEmpleado = mvarlistaEmpleado.Item(i)
    cboEmpleado.AddItem bEmpleado.sNombreCorto
Next
cboEmpleado.ListIndex = 0
End Sub

Private Sub cmdMostrar_Click()
Dim bparm As New BParametrosReporte
bparm.dFechaIni = Me.dtInicio.value
bparm.dFechaFin = Me.dtFin.value
If cboEmpleado.ListIndex <> 0 Then
    Set bparm.bEmpleado = mvarlistaEmpleado.Item(cboEmpleado.ListIndex)
Else
    Set bparm.bEmpleado = New bEmpleado
    bparm.bEmpleado.nCodigo = 0
End If

bparm.OcultarCampos = Me.chkOcultarCamposPrecio.value
control.mostrarReporteComisiones bparm
End Sub

Private Sub Form_Load()
Me.dtInicio.value = Date
Me.dtFin.value = Date
End Sub

Private Sub cmdSalir_Click()
Unload Me
End Sub



